package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCodingSerialRecordMapper;
import com.ruoyi.system.domain.SysCodingSerialRecord;
import com.ruoyi.system.service.ISysCodingSerialRecordService;

/**
 * 编码流水号记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class SysCodingSerialRecordServiceImpl implements ISysCodingSerialRecordService 
{
    @Autowired
    private SysCodingSerialRecordMapper sysCodingSerialRecordMapper;

    /**
     * 查询编码流水号记录
     * 
     * @param recordId 编码流水号记录主键
     * @return 编码流水号记录
     */
    @Override
    public SysCodingSerialRecord selectSysCodingSerialRecordByRecordId(Long recordId)
    {
        return sysCodingSerialRecordMapper.selectSysCodingSerialRecordByRecordId(recordId);
    }

    /**
     * 查询编码流水号记录列表
     * 
     * @param sysCodingSerialRecord 编码流水号记录
     * @return 编码流水号记录
     */
    @Override
    public List<SysCodingSerialRecord> selectSysCodingSerialRecordList(SysCodingSerialRecord sysCodingSerialRecord)
    {
        return sysCodingSerialRecordMapper.selectSysCodingSerialRecordList(sysCodingSerialRecord);
    }

    /**
     * 新增编码流水号记录
     * 
     * @param sysCodingSerialRecord 编码流水号记录
     * @return 结果
     */
    @Override
    public int insertSysCodingSerialRecord(SysCodingSerialRecord sysCodingSerialRecord)
    {
        sysCodingSerialRecord.setCreateTime(DateUtils.getNowDate());
        return sysCodingSerialRecordMapper.insertSysCodingSerialRecord(sysCodingSerialRecord);
    }

    /**
     * 修改编码流水号记录
     * 
     * @param sysCodingSerialRecord 编码流水号记录
     * @return 结果
     */
    @Override
    public int updateSysCodingSerialRecord(SysCodingSerialRecord sysCodingSerialRecord)
    {
        sysCodingSerialRecord.setUpdateTime(DateUtils.getNowDate());
        return sysCodingSerialRecordMapper.updateSysCodingSerialRecord(sysCodingSerialRecord);
    }

    /**
     * 批量删除编码流水号记录
     * 
     * @param recordIds 需要删除的编码流水号记录主键
     * @return 结果
     */
    @Override
    public int deleteSysCodingSerialRecordByRecordIds(Long[] recordIds)
    {
        return sysCodingSerialRecordMapper.deleteSysCodingSerialRecordByRecordIds(recordIds);
    }

    /**
     * 删除编码流水号记录信息
     * 
     * @param recordId 编码流水号记录主键
     * @return 结果
     */
    @Override
    public int deleteSysCodingSerialRecordByRecordId(Long recordId)
    {
        return sysCodingSerialRecordMapper.deleteSysCodingSerialRecordByRecordId(recordId);
    }
}
